package com.example.demo.entity.primary;

import javax.persistence.*;

/**
 * Created by dongjunpeng on 2017/10/12.
 */
@Entity
@Table(name = "crane_type")
public class CraneTypeEntity {
    private int craneTypeId;
    private String craneType;

    @Id
    @Column(name = "crane_type_id")
    public int getCraneTypeId() {
        return craneTypeId;
    }

    public void setCraneTypeId(int craneTypeId) {
        this.craneTypeId = craneTypeId;
    }

    @Basic
    @Column(name = "crane_type")
    public String getCraneType() {
        return craneType;
    }

    public void setCraneType(String craneType) {
        this.craneType = craneType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CraneTypeEntity that = (CraneTypeEntity) o;

        if (craneTypeId != that.craneTypeId) return false;
        if (craneType != null ? !craneType.equals(that.craneType) : that.craneType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = craneTypeId;
        result = 31 * result + (craneType != null ? craneType.hashCode() : 0);
        return result;
    }
}
